import Mock from 'mockjs'
import Axios from 'axios'
// 导入模拟数据
import bannerMockData from './banner.json'
import floorMockData from './floor.json'

// 创建 虚拟接口 及 虚拟的接口返回数据
Mock.mock('/testMock',[1,2,3])
Mock.mock('/testMock01','post',{a:1})

// 测试mock -Success
Axios.get('/testMock').then(res => {
	// console.log(res)
})
Axios.post('/testMock01').then(res => {
	// console.log(res)
})


// 轮播图数据模拟
Mock.mock('/mock/banner',{
	code:200,
	message:'成功',
	ok:'true',
	data:bannerMockData
})

// 测试轮播数据
// Axios.get('/banner').then(res => {
// 	console.log(res)
// })

// 模拟楼层数据
Mock.mock('/mock/floor',{
	code:200,
	message:'成功',
	ok:'true',
	data:floorMockData
})

// Axios.get('/mock/floor').then(res => {
// 	console.log("floorMockData",res.data)
// })

